Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: swipe to reply not working on first try #3061

Merged

Conversation

vitorhugods
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

As noticed by some, the swipeToReply doesn't work properly on first time.

Causes

  1. It was working fine when using a 1.6.x stable version of Compose Foundation.
  2. It broke when moving to an early 1.7.0-alpha version.
  3. It seemed "fixed" after updating to later 1.7.0-betaversion.

But, it seems that it has a breaking change now that I'm not sure if is intended or not, so I opened an issue on Google's Issue Tracker.

We override the local touchSlop to make easier to scroll through the messages without activating the swipe action.

But with these new versions of Foundation, when overriding the the touchSlop locally using a CompositionLocalProvider, we need to make sure that both the AnchoredDraggableState and the anchoredDraggable modifier are used within the same local composition provider.

Solutions

Just move the AnchoredDraggableState initialisation inside the CompositionLocalProvider.

ALSO, a slight improvement: reduce a bit the drag required to reply. When developing it I was a bit unsure if 25% or 33% of the screen was best initially, but 33% is a bit too much compared to the experience in other messengers.

Testing

Manually tested


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@vitorhugods vitorhugods requested review from a team, typfel, alexandreferris, mchenani, ohassine and saleniuk and removed request for a team June 3, 2024 08:21
@vitorhugods vitorhugods enabled auto-merge (squash) June 3, 2024 08:21
@vitorhugods vitorhugods requested review from MohamadJaara and removed request for typfel June 3, 2024 08:22
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Test Results

928 tests   928 ✅  12m 37s ⏱️
123 suites    0 💤
123 files      0 ❌

Results for commit ed19460.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jun 3, 2024

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 5109 succeeded.

The build produced the following APK's:

Copy link

sonarqubecloud bot commented Jun 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented Jun 3, 2024

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 5114 succeeded.

The build produced the following APK's:

@vitorhugods vitorhugods merged commit 0cb4489 into release/candidate Jun 4, 2024
14 checks passed
@vitorhugods vitorhugods deleted the fix/swipe-to-reply-not-working-on-first-try branch June 4, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants